<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="utf-8">
        <title>超多优惠 - 快来领取吧</title>
        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
        <link href="/static/css/animate.css" rel="stylesheet">
        <link href="/static/css/style.css" rel="stylesheet">
        <link href="/static/css/benefit.css" rel="stylesheet">
    </head>
    <body class="gray-bg">
        <link rel="stylesheet" href="/static/css/amazeui.swiper.min.css"/>
        <i id="scriptTag">/static/js/wechat/index.js</i>

        <!--START Nav-->
        <header class="navy-bg" id="nav-bar">
            <ul>
                <li class="city-chosen" data-city="<?php echo isset($city) ? $city : '未选择';?>">
                    <a class="btn btn-primary" href="#">
                        <?php echo isset($city) ? $city : '未选择';?>
                        <space></space>
                        <span class="caret"></span>
                    </a> 
                </li>
                <li class="search-chosen">
                    <div class="input-group">
                        <span class="input-group-addon text-navy" id="basic-addon1"><i class="glyphicon glyphicon-search"></i></span>
                        <input type="text" class="form-control" placeholder="请输入商家名称" aria-describedby="basic-addon1">
                    </div>  
                </li>
                <li class="nav-btn-group">
                    <a class="btn btn-primary btn-lg" href="#">
                        <i class="fa fa-user"></i>
                    </a>  
                </li>
            </ul>
        </header>
        <!--END Nav-->

        <!-- START Slider-->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <?php foreach ($banner as $item) { ?>
                    <div class="swiper-slide">
                        <a href="<?php echo $item['banner_redirect_url'] == TRUE ? $item['banner_redirect_url'] : 'javascript:;'; ?>">
                            <img lazy-src="<?php echo $item['banner_img_url']; ?>" src="/static/img/wechat/default.png" style="width: 100%;height:auto;">
                        </a>
                    </div>
                <?php } ?>
            </div>
        </div>
        <!-- END Slider-->

        <!--START couponlist-->
        <?php foreach ($coupon as $item) { ?>
            <div class="coupon-list-wrapper white-bg">
                <a href="/benefit/coupon/<?php echo $item['id']; ?>" class="pull-left">
                    <img alt="image"
                         lazy-src=""
                         src="/static/img/wechat/default.png"
                         >
                </a>
                <div class="media-body">
                    <a href="#">
                        <?php echo $item['shop_name']; ?>
                    </a>
                    <p><?php echo $item['coupon_info']; ?></p>
                    <small class="text-navy"> <?php echo date('Y-m-d', $item['coupon_start']) . '&nbsp;至&nbsp;' . date('Y-m-d', $item['coupon_end']); ?></small>
                </div>
            </div>
        <?php } ?>
        <!--END couponlist-->

        <!--START Powerby-->
        <p id="powder-by">由博讯尚品提供技术支持</p>
        <!--END Powerby-->

        <!-- 微信JSSDK -->
        <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
        <script type="text/javascript">
            wx.config({
                debug: true,
                appId: "<?php echo $signdata['appId']; ?>",
                timestamp: <?php echo $signdata['timestamp']; ?>,
                nonceStr: "<?php echo $signdata['nonceStr']; ?>",
                signature: "<?php echo $signdata['signature']; ?>",
                jsApiList: ['getLocation']
            });
        </script>
        <!-- 微信JSSDK  -->
        <!-- 微信JSSDK config必须在require.js前执行,否则会报错  -->
        <script data-main="/static/js/wechat-frame.js" src="/static/js/require.min.js"></script>
    </body>
</html>
